package com.lmk.homework.w02;

public class HourlyEmployee extends Employee{ private  int hour;
    private int  wage;



    public HourlyEmployee(String name, int number, MyDate birthday, int hour, int wage) {
        super(name, number, birthday);
        this.hour = hour;
        this.wage = wage;
    }

    public HourlyEmployee(int number, String name, int year, int month, int day, double wage, int hour) {
        super(name, number, new MyDate(year, month, day));
        this.wage = (int) wage;
        this.hour = hour;
    }

    @Override
    public double earning() {
        System.out.println(hour*wage);
        return 0;
    }


    @Override
    public String toString() {
        return super.toString() + '\t' + "时薪：" + wage + "      "+ "工作的小时：" + hour;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public int getWage() {
        return wage;
    }

    public void setWage(int wage) {
        this.wage = wage;
    }
}
